package com.lwp.junit.demo.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class Test1ServiceImpl implements Test1Service{

    @Autowired
    private Test2Service test2Service;

    public Test1ServiceImpl() {
        System.out.println("Test1ServiceImpl constructor ..." );
    }

    @Override
    public String m1(String name) {
        System.out.println("Test1ServiceImpl m1 ...");
        System.out.println(test2Service.m1(name));
        return name;
    }

    @Override
    public String m2(String name) {
        System.out.println("Test1ServiceImpl m2 ...");
        System.out.println(test2Service.m2(name));
        return name;
    }
}
